const loginPage = [
  {
    path: '/login',
    name: 'login',
    component: () =>
      import(/* webpackChunkName: "Login" */ '../pages/login/Login')
  }
]

const mainPage = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/main',
    name: 'main',
    component: () =>
      import(/* webpackChunkName: "Main" */ '../pages/main/Main'),
    children: [
      {
        path: '/infrastructure',
        name: '房源基建',
        component: () =>
            import(
              /* webpackChunkName: "Second" */ '../pages/main/routes/infrastructure/infrastructure.vue'
            )
      },
      {
        path: '/houseAllocation',
        name: '房源分配',
        component: () =>
            import(
              /* webpackChunkName: "First" */ '../pages/main/routes/houseAllocation/houseAllocation.vue'
            )
      },
      {
        path: '/loudongManage',
        name: '楼栋管理',
        component: () =>
          import(
            /* webpackChunkName: "First" */ '../pages/main/routes/loudongManage/loudongManage.vue'
          )
      },
      {
        path: '/bedManage',
        name: '床位管理',
        component: () =>
          import(
            /* webpackChunkName: "First" */ '../pages/main/routes/bedManage/bedManage.vue'
          )
      },
      {
        path: '/house4bks',
        name: '本科生房源',
        component: () =>
          import(
            /* webpackChunkName: "First" */ '../pages/main/routes/house4bks/house4bks.vue'
          )
      },
      {
        path: '/house4yjs',
        name: '研究生房源',
        component: () =>
          import(
            /* webpackChunkName: "First" */ '../pages/main/routes/house4yjs/house4yjs.vue'
          )
      },
      {
        path: '/houseStatistic',
        name: '园区统计',
        component: () =>
          import(
            /* webpackChunkName: "First" */ '../pages/main/routes/houseStatistic/houseStatistic.vue'
          )
      },
      {
        path: '/systemManage',
        name: '系统权限',
        component: () =>
          import(
            /* webpackChunkName: "First" */ '../pages/main/routes/systemManage/systemManage.vue'
          )
      },
      {
        path: '/beginAllocation',
        name: '开始分配',
        component: () =>
          import(
            /* webpackChunkName: "First" */ '../pages/main/routes/beginAllocation/beginAllocation.vue'
          )
      },
      {
        path: '/secret',
        name: '实验页面',
        component: () =>
          import(
            /* webpackChunkName: "First" */ '../pages/main/routes/experiment_secret/exp_secret.vue'
          )
      }
    ]
  }
]

const errorPage = [
  {
    path: '/notFound',
    name: 'notFound',
    component: () =>
      import(/* webpackChunkName: "NotFound" */ '../pages/error/NotFound')
  },
  {
    path: '/forbidden',
    name: 'forbidden',
    component: () =>
      import(/* webpackChunkName: "Forbidden" */ '../pages/error/Forbidden')
  },
  {
    path: '/badGateway',
    name: 'badGateway',
    component: () =>
      import(/* webpackChunkName: "BadGateway" */ '../pages/error/BadGateway')
  },
  {
    path: '*',
    redirect: '/notFound'
  }
]
export default [...loginPage, ...mainPage, ...errorPage]
